version: '3.1'

services:
#  postgres:
#    #    image: 'postgres:12.2'
#    #image: postgres
#    build:
#      context: ./
#      dockerfile: dockerfile.db
#    expose:
#      - "5432"
#    ports:
#      - "5432"
#    container_name: "postgres-java"
#    environment:
#      - 'POSTGRES_USER=postgres'
#      - 'POSTGRES_hOST_AUTH_METHOD=trust'
#      - 'POSTGRES_DB=banner'
#      - 'POSTGRES_PASSWORD=123456'
  app:
    build: ./
    network_mode: "host"
    container_name: "banner-app"
    ports:
      - '8080:8080'
   # depends_on:
  #    - postgres
    environment:
     # - 'SPRING_DATASOURCE_URL=jdbc:postgresql://127.0.0.1:5432/postgres'
      - 'SPRING_DATASOURCE_USERNAME=postgres'
      - 'SPRING_DATASOURCE_PASSWORD=123456'